<h3 class="page-title">媒体分类</h3>
<div class="tabbable-custom">
    <tabset>
        <tab ng-repeat="parent in parentMedias" heading="{{parent.mediaName}}" active="parent.active">
            <div class="portlet">
                 <div class="portlet-title">
                     <button class="btn btn-success title-action" ng-click="mediaGrid.add(parent)"
                             tabindex="0">
                         <i class="fa fa-plus"></i> 新增媒体形式
                     </button>
                 </div>
                 <div class="portlet-body" style="width: 100%">
                     <table ed-grid="mediaGrid_{{parent.mediaId}}" class="table table-striped table-bordered table-hover dataTable"
                            ed-url="mediaType/query.do?mediaType={{parent.mediaId}}" ed-model="mediaType" style="width: 100%">
                         <thead>
                         <tr>
                             <th ed-width="5%" ed-data="_index"></th>
                             <th ed-width="40%" ed-data="mediaName" class="edited input" >媒体形式</th>
                             <th ed-width="40%" ed-data="status | code : 'DATA_STATUS'">状态</th>
                             <th ed-width="15%">操作</th>
                         </tr>
                         </thead>
                     </table>
                 </div>
             </div>
    	</tab>
		<tab heading="车型">
            <div class="portlet">
                <div class="portlet-title">
                    <button class="btn btn-success title-action" ng-click="busTypeGrid.add()"
                            tabindex="0">
                        <i class="fa fa-plus"></i> 新增车型
                    </button>
                </div>
                <div class="portlet-body" style="width: 100%">
                    <table ed-grid="busTypeGrid" class="table table-striped table-bordered table-hover dataTable"
                           ed-url="busType/query.do" ed-model="busType" style="width: 100%">
                        <thead>
                        <tr>
                            <th ed-width="5%" ed-data="_index"></th>
                            <th ed-width="20%" ed-data="typeName" class="edited input">车型</th>
                            <th ed-width="20%" ed-data="descText" class="edited input">描述</th>
                            <th ed-width="20%" ed-data="status | code : 'DATA_STATUS'">状态</th>
                            <th ed-width="15%">操作</th>
                        </tr>
                        </thead>
                    </table>
                </div>
            </div>
        </tab>
    </tabset>
</div>

<div ed-modal="mediaTypeModal" data-options="width:'500px',title: '媒体形式编辑', icon: 'icon-settings',static : true">
    <div class="form" style="overflow: auto;height: 200px;">
        <form action="#" class="form-horizontal w5c-form" w5c-form-validate novalidate name="validateForm">
            <div class="form-body">
                <div class="form-group col-md-12">
                    <label class="col-md-3 control-label"><span class="required">*</span>媒体名称</label>

                    <div class="col-md-8">
                        <input type="text" class="form-control" name="mediaName" ng-model="mediaType.mediaName"
                               required>
                    </div>
                </div>
                <div class="form-group col-md-12">
                    <label class="col-md-3 control-label"><span class="required">*</span>媒体模式</label>

                    <div class="col-md-8">
                        <select class="form-control" name="modelType" ng-model="mediaType.modelType"
                                ng-options="opt.value as opt.name for opt in options.media_model_type"
                                required>
                        </select>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>


<div ed-modal="busTypeModal" data-options="width:'900px',title: '车辆型号编辑', icon: 'fa-bus',static : true">
    <div class="form" style="overflow: auto;height: 500px;">
        <form action="#" class="form-horizontal w5c-form" w5c-form-validate novalidate name="validateBusForm">
            <div class="form-body">
                <div class="form-group">
                    <span style="color: #a94442;">*</span>
                    <label class="col-md-3 control-label">车辆型号</label>

                    <div class="col-md-4">
                        <input type="text" class="form-control" name="typeName" ng-model="busType.typeName"
                               required>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">描　　述</label>

                    <div class="col-md-4" >
                        <textarea class="form-control" style="width: 320px;" name="descText" ng-model="busType.descText">

                        </textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">照　　片</label>
                    <div class="col-md-9">
                        <div ed-uploader data-options="text:' 文件上传',accept:'image/*'" class="ng-uploader" ng-model="busType.file" ed-upload-dir="bus_type">
                        </div>
                        <div class="mix-grid" style="display: block;">
	                    	<div class="mix" style="display: inline-block;opacity: 1;padding-right: 5px;">
	                    		<div class="mix-inner">
									<img class="img-responsive" ng-src="{{busType.file.path ? (nginxPath + busType.file.path):' '}}" alt="请上传照片" style="width:150px;height:120px">
									<div class="mix-details" style="height:50%;" ng-if="busType.file.path">
										<a class="mix-preview fancybox-button"  style="position: static;display: inline-block;" ng-href="{{nginxPath+busType.file.path}}" data-rel="fancybox-button">
											<i class="fa fa-search"></i>
										</a>
									</div>
								</div>
							</div>
						</div>
                    </div>
                </div>
                

            </div>
        </form>
    </div>
</div>

